3.476 \(\int \frac{\sec ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx\)
Optimal. Leaf size=232 \[ \frac{3 b^2 \left (-5 a^2 b^2+4 a^4+2 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^4 d (a-b)^{5/2} (a+b)^{5/2}}+\frac{\left (-11 a^2 b^2+2 a^4+6 b^4\right ) \tan (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac{b^2 \tan (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac{3 b \tanh ^{-1}(\sin (c+d x))}{a^4 d} \]
[Out]
(3*b^2*(4*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^4*(a - b)^(5/2)*(a +
b)^(5/2)*d) - (3*b*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4 - 11*a^2*b^2 + 6*b^4)*Tan[c + d*x])/(2*a^3*(a^2 -
b^2)^2*d) + (b^2*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (3*b^2*(2*a^2 - b^2)*Tan[c + d*x]
)/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))
________________________________________________________________________________________
Rubi [A] time = 0.783818, antiderivative size = 232, normalized size of antiderivative = 1.,
number of steps used = 7, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used =
{2802, 3055, 3001, 3770, 2659, 205} \[ \frac{3 b^2 \left (-5 a^2 b^2+4 a^4+2 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^4 d (a-b)^{5/2} (a+b)^{5/2}}+\frac{\left (-11 a^2 b^2+2 a^4+6 b^4\right ) \tan (c+d x)}{2 a^3 d \left (a^2-b^2\right )^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))}+\frac{b^2 \tan (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}-\frac{3 b \tanh ^{-1}(\sin (c+d x))}{a^4 d} \]
Antiderivative was successfully verified.
[In]
Int[Sec[c + d*x]^2/(a + b*Cos[c + d*x])^3,x]
[Out]
(3*b^2*(4*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^4*(a - b)^(5/2)*(a +
b)^(5/2)*d) - (3*b*ArcTanh[Sin[c + d*x]])/(a^4*d) + ((2*a^4 - 11*a^2*b^2 + 6*b^4)*Tan[c + d*x])/(2*a^3*(a^2 -
b^2)^2*d) + (b^2*Tan[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^2) + (3*b^2*(2*a^2 - b^2)*Tan[c + d*x]
)/(2*a^2*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x]))
Rule 2802
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -S
imp[(b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 -
b^2)), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n
*Simp[a*(b*c - a*d)*(m + 1) + b^2*d*(m + n + 2) - (b^2*c + b*(b*c - a*d)*(m + 1))*Sin[e + f*x] - b^2*d*(m + n
+ 3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] &
& NeQ[c^2 - d^2, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*n] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !
(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Rule 3055
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e +
f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dis
t[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b
*c - a*d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - a*b*B + a^2*C) + (m + 1)*(b*
c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /;
FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && Lt
Q[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&
!IntegerQ[m]) || EqQ[a, 0])))
Rule 3001
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
&& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 2659
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 205
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rubi steps
\begin{align*} \int \frac{\sec ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx &=\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{\int \frac{\left (2 a^2-3 b^2-2 a b \cos (c+d x)+2 b^2 \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\int \frac{\left (2 a^4-11 a^2 b^2+6 b^4-a b \left (4 a^2-b^2\right ) \cos (c+d x)+3 b^2 \left (2 a^2-b^2\right ) \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )^2}\\ &=\frac{\left (2 a^4-11 a^2 b^2+6 b^4\right ) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\int \frac{\left (-6 b \left (a^2-b^2\right )^2+3 a b^2 \left (2 a^2-b^2\right ) \cos (c+d x)\right ) \sec (c+d x)}{a+b \cos (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )^2}\\ &=\frac{\left (2 a^4-11 a^2 b^2+6 b^4\right ) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}-\frac{(3 b) \int \sec (c+d x) \, dx}{a^4}+\frac{\left (3 b^2 \left (4 a^4-5 a^2 b^2+2 b^4\right )\right ) \int \frac{1}{a+b \cos (c+d x)} \, dx}{2 a^4 \left (a^2-b^2\right )^2}\\ &=-\frac{3 b \tanh ^{-1}(\sin (c+d x))}{a^4 d}+\frac{\left (2 a^4-11 a^2 b^2+6 b^4\right ) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}+\frac{\left (3 b^2 \left (4 a^4-5 a^2 b^2+2 b^4\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^4 \left (a^2-b^2\right )^2 d}\\ &=\frac{3 b^2 \left (4 a^4-5 a^2 b^2+2 b^4\right ) \tan ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^4 (a-b)^{5/2} (a+b)^{5/2} d}-\frac{3 b \tanh ^{-1}(\sin (c+d x))}{a^4 d}+\frac{\left (2 a^4-11 a^2 b^2+6 b^4\right ) \tan (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac{b^2 \tan (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}+\frac{3 b^2 \left (2 a^2-b^2\right ) \tan (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))}\\ \end{align*}
Mathematica [A] time = 4.1364, size = 205, normalized size = 0.88 \[ -\frac{\frac{a b^3 \sin (c+d x) \left (b \left (7 a^2-4 b^2\right ) \cos (c+d x)+8 a^3-5 a b^2\right )}{(a-b)^2 (a+b)^2 (a+b \cos (c+d x))^2}+\frac{6 b^2 \left (-5 a^2 b^2+4 a^4+2 b^4\right ) \tanh ^{-1}\left (\frac{(a-b) \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{b^2-a^2}}\right )}{\left (b^2-a^2\right )^{5/2}}-2 a \tan (c+d x)-6 b \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+6 b \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 a^4 d} \]
Antiderivative was successfully verified.
[In]
Integrate[Sec[c + d*x]^2/(a + b*Cos[c + d*x])^3,x]
[Out]
-((6*b^2*(4*a^4 - 5*a^2*b^2 + 2*b^4)*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(5/2)
- 6*b*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 6*b*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (a*b^3*(8*a^3
- 5*a*b^2 + b*(7*a^2 - 4*b^2)*Cos[c + d*x])*Sin[c + d*x])/((a - b)^2*(a + b)^2*(a + b*Cos[c + d*x])^2) - 2*a*T
an[c + d*x])/(2*a^4*d)
________________________________________________________________________________________
Maple [B] time = 0.121, size = 712, normalized size = 3.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(d*x+c)^2/(a+b*cos(d*x+c))^3,x)
[Out]
-1/d/a^3/(tan(1/2*d*x+1/2*c)-1)+3/d*b/a^4*ln(tan(1/2*d*x+1/2*c)-1)-1/d/a^3/(tan(1/2*d*x+1/2*c)+1)-3/d*b/a^4*ln
(tan(1/2*d*x+1/2*c)+1)-8/d*b^3/a/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a-b)/(a^2+2*a*b+b^2)*t
an(1/2*d*x+1/2*c)^3-1/d*b^4/a^2/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a-b)/(a^2+2*a*b+b^2)*ta
n(1/2*d*x+1/2*c)^3+4/d*b^5/a^3/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a-b)/(a^2+2*a*b+b^2)*tan
(1/2*d*x+1/2*c)^3-8/d*b^3/a/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a+b)/(a^2-2*a*b+b^2)*tan(1/
2*d*x+1/2*c)+1/d*b^4/a^2/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a+b)/(a^2-2*a*b+b^2)*tan(1/2*d
*x+1/2*c)+4/d*b^5/a^3/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b+a+b)^2/(a+b)/(a^2-2*a*b+b^2)*tan(1/2*d*x+
1/2*c)+12/d/(a^4-2*a^2*b^2+b^4)/((a-b)*(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))*b^2-1
5/d*b^4/a^2/(a^4-2*a^2*b^2+b^4)/((a-b)*(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))+6/d*b
^6/a^4/(a^4-2*a^2*b^2+b^4)/((a-b)*(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^3,x, algorithm="maxima")
[Out]
Exception raised: ValueError
________________________________________________________________________________________
Fricas [B] time = 8.66632, size = 2907, normalized size = 12.53 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^3,x, algorithm="fricas")
[Out]
[-1/4*(3*((4*a^4*b^4 - 5*a^2*b^6 + 2*b^8)*cos(d*x + c)^3 + 2*(4*a^5*b^3 - 5*a^3*b^5 + 2*a*b^7)*cos(d*x + c)^2
+ (4*a^6*b^2 - 5*a^4*b^4 + 2*a^2*b^6)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*c
os(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c)^2 + 2*a*
b*cos(d*x + c) + a^2)) + 6*((a^6*b^3 - 3*a^4*b^5 + 3*a^2*b^7 - b^9)*cos(d*x + c)^3 + 2*(a^7*b^2 - 3*a^5*b^4 +
3*a^3*b^6 - a*b^8)*cos(d*x + c)^2 + (a^8*b - 3*a^6*b^3 + 3*a^4*b^5 - a^2*b^7)*cos(d*x + c))*log(sin(d*x + c) +
1) - 6*((a^6*b^3 - 3*a^4*b^5 + 3*a^2*b^7 - b^9)*cos(d*x + c)^3 + 2*(a^7*b^2 - 3*a^5*b^4 + 3*a^3*b^6 - a*b^8)*
cos(d*x + c)^2 + (a^8*b - 3*a^6*b^3 + 3*a^4*b^5 - a^2*b^7)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2*(2*a^9 - 6
*a^7*b^2 + 6*a^5*b^4 - 2*a^3*b^6 + (2*a^7*b^2 - 13*a^5*b^4 + 17*a^3*b^6 - 6*a*b^8)*cos(d*x + c)^2 + (4*a^8*b -
20*a^6*b^3 + 25*a^4*b^5 - 9*a^2*b^7)*cos(d*x + c))*sin(d*x + c))/((a^10*b^2 - 3*a^8*b^4 + 3*a^6*b^6 - a^4*b^8
)*d*cos(d*x + c)^3 + 2*(a^11*b - 3*a^9*b^3 + 3*a^7*b^5 - a^5*b^7)*d*cos(d*x + c)^2 + (a^12 - 3*a^10*b^2 + 3*a^
8*b^4 - a^6*b^6)*d*cos(d*x + c)), 1/2*(3*((4*a^4*b^4 - 5*a^2*b^6 + 2*b^8)*cos(d*x + c)^3 + 2*(4*a^5*b^3 - 5*a^
3*b^5 + 2*a*b^7)*cos(d*x + c)^2 + (4*a^6*b^2 - 5*a^4*b^4 + 2*a^2*b^6)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a
*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - 3*((a^6*b^3 - 3*a^4*b^5 + 3*a^2*b^7 - b^9)*cos(d*x + c)^3
+ 2*(a^7*b^2 - 3*a^5*b^4 + 3*a^3*b^6 - a*b^8)*cos(d*x + c)^2 + (a^8*b - 3*a^6*b^3 + 3*a^4*b^5 - a^2*b^7)*cos(
d*x + c))*log(sin(d*x + c) + 1) + 3*((a^6*b^3 - 3*a^4*b^5 + 3*a^2*b^7 - b^9)*cos(d*x + c)^3 + 2*(a^7*b^2 - 3*a
^5*b^4 + 3*a^3*b^6 - a*b^8)*cos(d*x + c)^2 + (a^8*b - 3*a^6*b^3 + 3*a^4*b^5 - a^2*b^7)*cos(d*x + c))*log(-sin(
d*x + c) + 1) + (2*a^9 - 6*a^7*b^2 + 6*a^5*b^4 - 2*a^3*b^6 + (2*a^7*b^2 - 13*a^5*b^4 + 17*a^3*b^6 - 6*a*b^8)*c
os(d*x + c)^2 + (4*a^8*b - 20*a^6*b^3 + 25*a^4*b^5 - 9*a^2*b^7)*cos(d*x + c))*sin(d*x + c))/((a^10*b^2 - 3*a^8
*b^4 + 3*a^6*b^6 - a^4*b^8)*d*cos(d*x + c)^3 + 2*(a^11*b - 3*a^9*b^3 + 3*a^7*b^5 - a^5*b^7)*d*cos(d*x + c)^2 +
(a^12 - 3*a^10*b^2 + 3*a^8*b^4 - a^6*b^6)*d*cos(d*x + c))]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{2}{\left (c + d x \right )}}{\left (a + b \cos{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)**2/(a+b*cos(d*x+c))**3,x)
[Out]
Integral(sec(c + d*x)**2/(a + b*cos(c + d*x))**3, x)
________________________________________________________________________________________
Giac [A] time = 1.29209, size = 513, normalized size = 2.21 \begin{align*} -\frac{\frac{3 \,{\left (4 \, a^{4} b^{2} - 5 \, a^{2} b^{4} + 2 \, b^{6}\right )}{\left (\pi \left \lfloor \frac{d x + c}{2 \, \pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac{a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\sqrt{a^{2} - b^{2}}}\right )\right )}}{{\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} \sqrt{a^{2} - b^{2}}} + \frac{8 \, a^{3} b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 7 \, a^{2} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 5 \, a b^{5} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 4 \, b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 8 \, a^{3} b^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 7 \, a^{2} b^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 5 \, a b^{5} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 4 \, b^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )}{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a + b\right )}^{2}} + \frac{3 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac{3 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} + \frac{2 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )} a^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^3,x, algorithm="giac")
[Out]
-(3*(4*a^4*b^2 - 5*a^2*b^4 + 2*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x
+ 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^8 - 2*a^6*b^2 + a^4*b^4)*sqrt(a^2 - b^2)) + (8*a^3*b
^3*tan(1/2*d*x + 1/2*c)^3 - 7*a^2*b^4*tan(1/2*d*x + 1/2*c)^3 - 5*a*b^5*tan(1/2*d*x + 1/2*c)^3 + 4*b^6*tan(1/2*
d*x + 1/2*c)^3 + 8*a^3*b^3*tan(1/2*d*x + 1/2*c) + 7*a^2*b^4*tan(1/2*d*x + 1/2*c) - 5*a*b^5*tan(1/2*d*x + 1/2*c
) - 4*b^6*tan(1/2*d*x + 1/2*c))/((a^7 - 2*a^5*b^2 + a^3*b^4)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c
)^2 + a + b)^2) + 3*b*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^4 - 3*b*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^4 + 2*
tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*a^3))/d